

# use python "in" operator to check is item in the list
def isItem():
    listTab = [9,'s',3,'bus',"time","bird",34,3,5 ]
    findItem = 'bus'
    if findItem in listTab:
        return 1
    else:
        return 0

# use list.count() function to check if item in the list
def isItem():
    listTab = [9,'s',3,'bus',"time","bird",34,3,5 ]
    findItem = 'bus'
    if listTab.count(findItem) > 0:
        return 1
    else:
        return 0

if __name__ == '__main__':
    print(isItem())

# 思路都是对的，尝试将要查找的字符串和列表都当作函数来传递
